package com.opages.mvc.adapter.consul.model;

import com.opages.mvc.adapter.common.properties.ConfigurationProperties;

/**
 * consul服务端配置类
 * @author daizhong.liu
 * @create 2020-07-10 14:04
 **/
@ConfigurationProperties("spring.mvc.consul")
public class ConsulProperties {
    /** Consul agent hostname. Defaults to 'localhost'. */
    private String host = "localhost";

    /**
     * Consul agent scheme (HTTP/HTTPS). If there is no scheme in address - client will
     * use HTTP.
     */
    private String scheme;

    /** Consul agent port. Defaults to '8500'. */
    private int port = 8500;

    /** Is spring cloud consul enabled. */
    private boolean enabled = true;

    /** How often to perform the health check (e.g. 10s), defaults to 100000. */
    private long healthCheckInterval = 10000;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getScheme() {
        return scheme;
    }

    public void setScheme(String scheme) {
        this.scheme = scheme;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public long getHealthCheckInterval() {
        return healthCheckInterval;
    }

    public void setHealthCheckInterval(long healthCheckInterval) {
        this.healthCheckInterval = healthCheckInterval;
    }
}
